package com.cj.DesignMode.adapterpattern;

/**
 * 适配器模式，适配每一种情况的接口，在AudioPlayer中适配上特殊情况的接口，
 * 虽然都是调用的audioPlayer.play但是实际逻辑需要根据audioType进行判断。
 */
public class AdapterPatternDemo {
    public static void main(String[] args) {
        AudioPlayer audioPlayer = new AudioPlayer();

        audioPlayer.play("mp3", "beyond the horizon.mp3");
        audioPlayer.play("mp4", "alone.mp4");
        audioPlayer.play("vlc", "far far away.vlc");
        audioPlayer.play("avi", "mind me.avi");
    }
}